home *** CD-ROM | disk | FTP | other *** search
- ; Installation script for Madhouse V1.1
- ; Revision 2 - multilingual, docs in lha archive, size-checks.
-
- (complete 0)
-
- (set mainprgsource "Madhouse")
- (set mainprgdest "SYS:WBStartup")
-
- ; File-sizes for space check. Including icons.
- (set size-mainprg 42000 )
- (set size-amoslib 48000 )
- (set size-locale 8000 )
- (set size-configed 93000 )
- (set size-blankers 510000 )
- (set size-germandoc 192000 )
- (set size-englishdoc 115000 )
-
- (if (= @language "Deutsch") (
- (set @def-anleit 0)
- (set size-defaultdoc size-germandoc)
-
- (set #wrong-os
- (cat "\nTut uns leid, Madhouse benötigt OS v2.04 oder höher!!\n"))
-
- (set #diskfull
- (cat "Das Installationsscript muß leider abbrechen, weil auf der "
- "Diskette / Festplattenpartition \"%s\" nicht genug Platz "
- "vorhanden ist." ))
-
- (set #copying-mainprg
- (cat "\nJetzt wird das Programm Madhouse in Ihre "
- "SYS:WBStartup-Schublade kopiert. Dort wird es dann nach "
- "jedem Reset gestartet.\n"
- "Dieses Programm verwaltet die "
- "Blanker, das Einstellungsprogramm muß ebenfalls damit "
- "aufgerufen werden."))
-
- (set #select-defdir
- (cat "Bitte wählen Sie jetzt die Schublade, in der der "
- "Anleitungstext, der MadhouseConfigEd und die Blanker installiert werden sollen.\n"
- "Wenn Sie keine Festplatte haben, ist es praktisch, die "
- "Blanker auf eine Diskette zu installieren, die oft im "
- "Laufwerk liegt. Dann hat Madhouse mehr Gelegenheiten den "
- "Puffer mit einem neuen Blanker zu füllen.\n\n"
- "In diesem Verzeichnis sollten mindestens 610 KB frei sein!\n" ))
-
- (set #select-dir-prompt
- (cat
- "Wählen Sie das Verzeichnis, in dem Madhouse installiert "
- "werden soll. Vergessen Sie nicht, ein neues Unterverzeichnis "
- "anzulegen, falls Sie eines wünschen!" ))
-
- (set #select-dir-help
- (cat
- "Wie vorhin gesagt wurde, sollten Sie hier das Zielverzeichnis "
- "für Madhouse auswählen, in das die Anleitungen, der MadhouseConfigEd und "
- "die Blanker geschrieben werden.\nUm ein neues Verzeichnis anzulegen, "
- "benutzen Sie \"Make new drawer...\" und geben Sie den Namen in das Textfeld "
- "ein."))
-
- (set #no-min-space
- (cat "Leider reicht der Platz auf der ausgewählten Diskette / Festplatte "
- "nicht mal für die nötigsten Dateien. Bitte wählen Sie einen anderen "
- "Pfad (\"Proceed\") oder brechen Sie die Installation ab "
- "(\"Abort Install\")." ))
- (set #no-doc-space
- (cat "Der Platz auf der ausgewählten Diskette / Festplatte reicht zwar für "
- "die nötigsten Dateien, aber die deutsche Anleitung paßt schon nicht "
- "mehr. Wollen Sie einen neuen Pfad wählen?" ))
- (set #yes
- (cat "Ja." ))
- (set #no
- (cat "Nein." ))
-
- (set #doing-docs
- (cat "Die deutsche Anleitung wird entpackt." ))
-
- (set #doing-configed
- (cat "\nJetzt wird der MadhouseConfigEd kopiert." ))
-
- (set #blank
- (cat"\nJetzt werden die Blanker kopiert." ))
-
- (set #icontext
- (cat "Für das Madhouse-Programm in WBStartup/ stehen sieben Icons zur Auswahl (Zur "
- "Entscheidungshilfe zuerst in Icons/ ansehen, dann fortfahren.)\n"
- "MWB=Die MagicWB-Farben müssen installiert sein."))
- (set #iconchoices-1
- (cat "Standard-Icon (Hauptfenster)" ))
- (set #iconchoices-2
- (cat "Schwarzer Keil (MWB)" ))
- (set #iconchoices-3
- (cat "Monitor" ))
- (set #iconchoices-4
- (cat "Monitor (MWB)" ))
- (set #iconchoices-5
- (cat "Schwarzer Monitor" ))
- (set #iconchoices-6
- (cat "Schwarzer Monitor (MWB)" ))
- (set #iconchoices-7
- (cat "Madhouse-Schriftzug" ))
-
- (set #diskfull-locale
- (cat "Dies ist zwar ein Amiga mit OS 2.1 oder höher, die deutschsprachigen "
- "Locale-Dateien können jedoch trotzdem nicht installiert werden, weil "
- "auf der zuständigen Diskette / Festplattenpartition nicht mehr "
- "genügend Platz ist." ))
-
- (set #use-locale
- (cat "TOLL! Dies ist ein Amiga mit OS 2.1 oder höher! Wenn Sie also wollen, können "
- "die Programtexte von Madhouse auf deutsch erscheinen.\n"
- "Sollen die deutschen Locale-Texte installiert werden?"))
- (set #locale-1
- (cat "Ja" ))
- (set #locale-2
- (cat "Diesen Teil überspringen" ))
-
- (set #doing-amoslib
- (cat "Die amos.library wird kopiert ..." ))
-
- (set #extro
- (cat "Madhouse wurde korrekt installiert. Beim Systemstart wird das Hauptprogramm "
- "von nun an automatisch aktiviert, solange Sie nicht das Programm SYS:WBStartup/Madhouse "
- "löschen. Dort können Sie es jetzt auch direkt aufrufen, um einen Reset zu "
- "umgehen.\n"
- "Besonders, wenn Sie keine Festplatte besitzen, sollten Sie einen Blick in die "
- "Anleitung werfen, sonst natürlich auch...\n\n"
- "Viel Spaß!" ))
- ))
-
-
- (if (= @language "English") (
- (set @def-anleit 1)
- (set size-defaultdoc size-englishdoc)
-
- (set #wrong-os
- (cat "\nSorry, Madhouse needs OS 2.04 or higher!\n"))
-
- (set #diskfull
- (cat "The script has to abort, because the disk / partition \"%s\" does "
- "not have enough free disk space." ))
-
- (set #copying-mainprg
- (cat "\nNow, the programm Madhouse will be copied into your SYS:WBStartup-drawer. "
- "There it will be started after every reset. This program handles the "
- "blankers, and you have to run the prefs-editor \"MadhouseConfigEd\" from it."))
-
- (set #select-defdir
- (cat "Please select the drawer, in which you want to copy the doc, MadhouseConfigEd "
- "and the blankers in the following requester.\nIf you do not have a hard disk, "
- "it is useful to install the blankers onto a disk which is used often. Madhouse "
- "has more chances to refresh its buffer in this case.\nYou will need 610 KB of "
- "disk space."))
-
- (set #select-dir-prompt
- (cat "Select the drawer in which you want to install Madhouse. If you prefer an own "
- "subdirectory for Madhouse, please create one!" ))
-
- (set #select-dir-help
- (cat "The script will copy MadhouseConfigEd, the docs and the blankers into the "
- "drawer you have to select here. Create a new directory by using "
- "\"Make New Drawer...\" and entering the name of it into the string gadget." ))
-
- (set #doing-docs
- (cat "Decrunching english documentation." ))
-
- (set #doing-configed
- (cat "\nNow, MadhouseConfigEd will be copied." ))
-
- (set #blank
- (cat"\nNow, the blankers will be copied." ))
-
- (set #icontext
- (cat "You have got the choice out of seven icons for the Madhouse-program (in "
- "SYS:WBStartup). To make a decision, you can look at the icons right now "
- "(\"Icons\"-drawer) first. MWB = you "
- "need the MagicWB-colors on your Workbench."))
- (set #iconchoices-1
- (cat "Standard-Icon (from Madhouse-dir)" ))
- (set #iconchoices-2
- (cat "Colored points & black area (MWB)" ))
- (set #iconchoices-3
- (cat "Monitor" ))
- (set #iconchoices-4
- (cat "Monitor (MWB)" ))
- (set #iconchoices-5
- (cat "Black Monitor" ))
- (set #iconchoices-6
- (cat "Black Monitor (MWB)" ))
- (set #iconchoices-7
- (cat "Madhouse-Text" ))
-
- ; Obsolete, english strings are built-in.
- (set #use-locale
- (cat "" ))
- (set #locale-1
- (cat "" ))
- (set #locale-2
- (cat "" ))
-
- (set #doing-amoslib
- (cat "Copying amos.library ..." ))
-
- (set #extro
- (cat "Madhouse was installed correctly. While booting, the main program \"Madhouse\" "
- "will be started automatically, as long as you don't delete it (it is in "
- "SYS:WBStartup). You can start it directly, if you don't want to reset your "
- "machine.\nEspecially if you do not own a hard disk, you should read the "
- "doc, otherwise you should it do anyway, of course...\n\nEnjoy!"))
- ))
-
-
-
- ; **** Auf OS 2.04 checken.
-
- (if (< (/ (getversion) 65536) 37)
- (
- (message #wrong-os)
- (exit (quiet))
- )
- )
- (complete 1)
-
-
-
- ; **** Erster size-check
-
- (set wb-space (getdiskspace "SYS:" ))
- (set lib-space (getdiskspace "LIBS:" ))
-
- (if (< wb-space size-mainprg) (
- (abort (#diskfull (expandpath "SYS:")) )
- ))
-
- (if (< lib-space size-amoslib) (
- (abort (#diskfull (expandpath "LIBS:")) )
- ))
-
- (complete 2)
-
-
-
-
- ; **** Main-Program in SYS:WBStartup/
-
- (complete 0)
-
- (message #copying-mainprg )
-
- (copyfiles
- (source mainprgsource)
- (dest mainprgdest)
- )
- (complete 10)
-
-
-
- ; **** Icon for Main-Program
-
- (run ("delete SYS:WBStartup/Madhouse.info"))
- (set icontype (askchoice
- (prompt #icontext )
- (help "" )
- (choices #iconchoices-1 #iconchoices-2 #iconchoices-3 #iconchoices-4 #iconchoices-5 #iconchoices-6 #iconchoices-7 )
- (default 5)
- )
- )
- (set @icondest "BlaBla!")
- (if (= icontype 0) (
- (set @iconsource "Madhouse.info")
- (set @icondest "SYS:WBStartup/Madhouse.info")
- ))
- (if (= icontype 1) (
- (set @iconsource "Icons/Madhouse_MWB1.info")
- (set @icondest "SYS:WBStartup/Madhouse_MWB1.info")
- ))
- (if (= icontype 2) (
- (set @iconsource "Icons/Madhouse2.info")
- (set @icondest "SYS:WBStartup/Madhouse2.info")
- ))
- (if (= icontype 3) (
- (set @iconsource "Icons/Madhouse_MWB2.info")
- (set @icondest "SYS:WBStartup/Madhouse_MWB2.info")
- ))
- (if (= icontype 4) (
- (set @iconsource "Icons/Madhouse3.info")
- (set @icondest "SYS:WBStartup/Madhouse3.info")
- ))
- (if (= icontype 5) (
- (set @iconsource "Icons/Madhouse_MWB3.info")
- (set @icondest "SYS:WBStartup/Madhouse_MWB3.info")
- ))
- (if (= icontype 6) (
- (set @iconsource "Icons/Madhouse4.info")
- (set @icondest "SYS:WBStartup/Madhouse4.info")
- ))
- (copyfiles
- (source @iconsource)
- (dest "SYS:WBStartup")
- )
- (run ("rename %s SYS:WBStartup/Madhouse.info" @icondest ))
- (complete 17)
-
-
-
- ; **** Locale
-
- (if (> (/ (getversion) 65536) 37)
- (
- (if (<> @language "English" ) (
-
- (set loc-space (getdiskspace "LOCALE:" ))
- (if (< loc-space size-locale) (
- (message ( #diskfull-locale ))
- )(
- (if (askbool (prompt #use-locale)
- (help "")
- (choices #locale-1 #locale-2 ))
- (
- (copyfiles
- (source "locale/deutsch/madhouse.catalog")
- (dest "LOCALE:Catalogs/deutsch")
- )
- ))
- ))
- ))
- )
- )
- (complete 27)
-
-
-
- ; **** Library
-
- (copylib
- (prompt #doing-amoslib )
- (help "" )
- (source "libs/amos.library")
- (dest "Libs:")
- (confirm)
- )
-
- (complete 30)
-
-
-
- ; **** Set directory for docs, blankers etc...
-
- (set min-space (+ size-configed size-blankers))
- (set doc-space (+ min-space size-defaultdoc))
-
- (message #select-defdir )
-
- (set loopagain 1)
-
- (while loopagain (
- (set @default-dest
- (askdir
- (prompt #select-dir-prompt )
- (help #select-dir-help )
- (default ":")
- )
- )
-
- (set avail-space (getdiskspace @default-dest))
-
- (if (< avail-space min-space) (
- ; Viel zu wenig Platz für's nötigste
- (message #no-min-space)
- )(
- (if (< avail-space doc-space) (
- ; Blanker passen, sonst nichts.
- (if (askbool (prompt #no-doc-space)
- (help "")
- (choices #yes #no ))
- (
- (set loopagain 1)
- )(
- (set loopagain 0)
- ))
- )(
- ; Alles paßt.
- (set loopagain 0)
- ))
- ))
- ))
-
- (complete 40)
-
-
-
- ; **** DOC-FILES
-
- (working #doing-docs)
-
- ; I need this for my lha-version, which expects an "/" after the path.
- (if (= (strlen (cat @default-dest "/x")) (strlen (tackon @default-dest "x")))
- (set lha-dest (cat @default-dest "/" ))
- (set lha-dest @default-dest)
- )
-
- (if (> avail-space doc-space) (
- (if (= @def-anleit 0) (
- (run ("C:Lha -q -E -I e Documentations.lha Anleitung.guide Anleitung.guide.info Registration_D.txt \"%s\"" lha-dest ))
- )(
- (run ("C:Lha -q -E -I e Documentations.lha Doc.guide Doc.guide.info Registration_E.txt \"%s\"" lha-dest ))
- ))
- ))
-
- (complete 50)
-
-
-
- ; **** MadhouseConfigEd
-
- (message #doing-configed)
- (copyfiles
- (source "MadhouseConfigEd")
- (dest @default-dest)
- )
- (complete 60)
-
-
-
- ; **** Blankers
-
- (message #blank )
-
- (set bl-dest ( tackon @default-dest "Blankers" ) )
-
- (makedir bl-dest )
-
- (copyfiles
- (source "blankers" )
- (dest bl-dest )
- (help "" )
- (all)
- (infos)
- )
-
- (copyfiles
- (source "blankers.info" )
- (dest @default-dest )
- (help "" )
- (infos)
- )
-
- (complete 98)
-
-
-
- ; **** Set ToolType for SYS:WBStartup/Madhouse
-
- (tooltype (dest "SYS:WBStartup/Madhouse")
- (settooltype "CONFIGED" (tackon @default-dest "MadhouseConfigEd"))
- )
- (complete 100)
-
-
-
- ; **** Extro
-
- (message #extro)
-
-
-
- ; **** Finished!
-
-
-